﻿@{
    ViewBag.Title = "SiteAttributes";    
}

<div style="width: 100%; float:left; position:relative; top: 60px; margin-left: 60px; margin-bottom: 60px;"> 
    <h2 class="blue-font-title" style="margin-left: 0;">SiteAttributes</h2>

    <script type="text/javascript">
        var data = @(Html.Raw(Json.Encode(Model)))
    </script>

    <script src="~/Scripts/knockout-2.2.1.js"></script>

    <form data-bind="submit: addSiteAttribute">
        Add Attribute: <input id="newNameText" data-bind="value: newNameText" placeholder="New Attribute Name" />
        <button class="btn btn-primary" type="submit">Add</button>
        @*<button type="button" id="btnAddFriendSite">Add</button>*@
    </form>

    <ul data-bind="foreach: siteAttributes, visible: siteAttributes().length > 0">
        <li>
            @*<input data-bind="value: id" />*@
            <input data-bind="value: Name, event:{ change: $parent.editSiteAttribute }" />
            @*<input data-bind="value: SiteId" />*@
        </li> 
    </ul>
</div>

@section scripts {
    <script src="~/Scripts/jquery.signalR-1.1.2.js"></script>
    <script src="~/signalr/hubs"></script>
    <script src="~/Areas/Admin/ViewModel/SiteAttributesVM.js"></script>
}